set(TRANSLATOR_SOURCES    
    #src/compiler/preprocessor/ExpressionParser.cpp  
    #src/compiler/preprocessor/Tokenizer.cpp
    #src/compiler/translator/glslang_tab.cpp 
    #src/compiler/translator/glslang_lex.cpp
    src/compiler/preprocessor/DiagnosticsBase.cpp       
    src/compiler/preprocessor/Input.cpp          
    src/compiler/preprocessor/Preprocessor.cpp        
    src/compiler/preprocessor/DirectiveHandlerBase.cpp  
    src/compiler/preprocessor/Lexer.cpp          
    src/compiler/preprocessor/preprocessor_lex_autogen.cpp
    src/compiler/preprocessor/DirectiveParser.cpp       
    src/compiler/preprocessor/Macro.cpp          
    src/compiler/preprocessor/preprocessor_tab_autogen.cpp        
    src/compiler/preprocessor/MacroExpander.cpp  
    src/compiler/preprocessor/Token.cpp
    src/common/aligned_memory.cpp           
    src/common/Float16ToFloat32.cpp        
    src/common/PackedGLEnums_autogen.cpp  
    src/common/PoolAlloc.cpp              
    src/common/android_util.cpp             
    src/common/mathutil.cpp                
    src/common/angleutils.cpp               
    src/common/string_utils.cpp           
    src/common/tls.cpp
    src/common/matrix_utils.cpp            
    src/common/uniform_type_info_autogen.cpp
    src/common/system_utils.cpp           
    src/common/utilities.cpp
    src/common/debug.cpp                    
    src/common/MemoryBuffer.cpp            
    src/common/system_utils_linux.cpp     
    src/common/event_tracer.cpp             
    src/common/PackedEGLEnums_autogen.cpp  
    src/common/system_utils_posix.cpp
    src/common/PackedEnums.cpp 
    src/compiler/translator/HashNames.cpp          
    src/compiler/translator/blocklayout.cpp                              
    src/compiler/translator/ImmutableString_autogen.cpp         
    src/compiler/translator/Symbol.cpp
    src/compiler/translator/ImmutableStringBuilder.cpp          
    src/compiler/translator/SymbolTable_autogen.cpp
    src/compiler/translator/BuiltInFunctionEmulator.cpp                  
    src/compiler/translator/ImmutableString_ESSL_autogen.cpp    
    src/compiler/translator/SymbolTable.cpp
    src/compiler/translator/BuiltInFunctionEmulatorGLSL.cpp              
    src/compiler/translator/InfoSink.cpp                        
    src/compiler/translator/SymbolTable_ESSL_autogen.cpp
    src/compiler/translator/Initialize.cpp                      
    src/compiler/translator/SymbolUniqueId.cpp
    src/compiler/translator/BuiltinsWorkaroundGLSL.cpp                   
    src/compiler/translator/InitializeDll.cpp                   
    src/compiler/translator/CallDAG.cpp                                  
    src/compiler/translator/IntermNode.cpp                      
    src/compiler/translator/TranslatorESSL.cpp
    src/compiler/translator/CodeGen.cpp                                  
    src/compiler/translator/IsASTDepthBelowLimit.cpp            
    src/compiler/translator/TranslatorGLSL.cpp
    src/compiler/translator/CollectVariables.cpp                         
    src/compiler/translator/Operator.cpp                        
    src/compiler/translator/Compiler.cpp                                 
    src/compiler/translator/OutputESSL.cpp                      
    src/compiler/translator/TranslatorMetal.cpp
    src/compiler/translator/ConstantUnion.cpp                            
    src/compiler/translator/OutputGLSLBase.cpp                  
    src/compiler/translator/TranslatorVulkan.cpp
    src/compiler/translator/Declarator.cpp                               
    src/compiler/translator/OutputGLSL.cpp                      
    src/compiler/translator/Types.cpp
    src/compiler/translator/Diagnostics.cpp                              
    src/compiler/translator/util.cpp
    src/compiler/translator/DirectiveHandler.cpp                         
    src/compiler/translator/OutputTree.cpp                      
    src/compiler/translator/OutputVulkanGLSL.cpp                
    src/compiler/translator/ValidateAST.cpp
    src/compiler/translator/ExtensionBehavior.cpp                        
    src/compiler/translator/ParseContext.cpp                    
    src/compiler/translator/ValidateGlobalInitializer.cpp
    src/compiler/translator/ExtensionGLSL.cpp                            
    src/compiler/translator/PoolAlloc.cpp                       
    src/compiler/translator/ValidateLimitations.cpp
    src/compiler/translator/FlagStd140Structs.cpp                        
    src/compiler/translator/QualifierTypes.cpp                  
    src/compiler/translator/ValidateMaxParameters.cpp
    src/compiler/translator/FunctionLookup.cpp                           
    src/compiler/translator/ValidateOutputs.cpp
    src/compiler/translator/glslang_lex_autogen.cpp                      
    src/compiler/translator/ShaderLang.cpp                      
    src/compiler/translator/ValidateSwitch.cpp                                  
    src/compiler/translator/ValidateVaryingLocations.cpp
    src/compiler/translator/glslang_tab_autogen.cpp                      
    src/compiler/translator/VariablePacker.cpp                                 
    src/compiler/translator/ShaderVars.cpp                      
    src/compiler/translator/VersionGLSL.cpp    
    src/compiler/translator/tree_ops/AddAndTrueToLoopCondition.cpp
    src/compiler/translator/tree_ops/AddAndTrueToLoopCondition.h
    src/compiler/translator/tree_ops/BreakVariableAliasingInInnerLoops.cpp
    src/compiler/translator/tree_ops/BreakVariableAliasingInInnerLoops.h
    src/compiler/translator/tree_ops/ClampFragDepth.cpp
    src/compiler/translator/tree_ops/ClampFragDepth.h
    src/compiler/translator/tree_ops/ClampPointSize.cpp
    src/compiler/translator/tree_ops/ClampPointSize.h
    src/compiler/translator/tree_ops/DeclareAndInitBuiltinsForInstancedMultiview.cpp
    src/compiler/translator/tree_ops/DeclareAndInitBuiltinsForInstancedMultiview.h
    src/compiler/translator/tree_ops/DeferGlobalInitializers.cpp
    src/compiler/translator/tree_ops/DeferGlobalInitializers.h
    src/compiler/translator/tree_ops/EarlyFragmentTestsOptimization.cpp
    src/compiler/translator/tree_ops/EarlyFragmentTestsOptimization.h
    src/compiler/translator/tree_ops/EmulateGLFragColorBroadcast.cpp
    src/compiler/translator/tree_ops/EmulateGLFragColorBroadcast.h
    src/compiler/translator/tree_ops/EmulateMultiDrawShaderBuiltins.cpp
    src/compiler/translator/tree_ops/EmulateMultiDrawShaderBuiltins.h
    src/compiler/translator/tree_ops/EmulatePrecision.cpp
    src/compiler/translator/tree_ops/EmulatePrecision.h
    src/compiler/translator/tree_ops/ExpandIntegerPowExpressions.cpp
    src/compiler/translator/tree_ops/ExpandIntegerPowExpressions.h
    src/compiler/translator/tree_ops/FoldExpressions.cpp
    src/compiler/translator/tree_ops/FoldExpressions.h
    src/compiler/translator/tree_ops/InitializeVariables.cpp
    src/compiler/translator/tree_ops/InitializeVariables.h
    src/compiler/translator/tree_ops/NameEmbeddedUniformStructs.cpp
    src/compiler/translator/tree_ops/NameEmbeddedUniformStructs.h
    src/compiler/translator/tree_ops/PruneEmptyCases.cpp
    src/compiler/translator/tree_ops/PruneEmptyCases.h
    src/compiler/translator/tree_ops/PruneNoOps.cpp
    src/compiler/translator/tree_ops/PruneNoOps.h
    src/compiler/translator/tree_ops/RecordConstantPrecision.cpp
    src/compiler/translator/tree_ops/RecordConstantPrecision.h
    src/compiler/translator/tree_ops/RegenerateStructNames.cpp
    src/compiler/translator/tree_ops/RegenerateStructNames.h
    src/compiler/translator/tree_ops/RemoveArrayLengthMethod.cpp
    src/compiler/translator/tree_ops/RemoveArrayLengthMethod.h
    src/compiler/translator/tree_ops/RemoveAtomicCounterBuiltins.cpp
    src/compiler/translator/tree_ops/RemoveAtomicCounterBuiltins.h
    src/compiler/translator/tree_ops/RemoveDynamicIndexing.cpp
    src/compiler/translator/tree_ops/RemoveDynamicIndexing.h
    src/compiler/translator/tree_ops/RemoveInactiveInterfaceVariables.cpp
    src/compiler/translator/tree_ops/RemoveInactiveInterfaceVariables.h
    src/compiler/translator/tree_ops/RemoveInvariantDeclaration.cpp
    src/compiler/translator/tree_ops/RemoveInvariantDeclaration.h
    src/compiler/translator/tree_ops/RemovePow.cpp
    src/compiler/translator/tree_ops/RemovePow.h
    src/compiler/translator/tree_ops/RemoveUnreferencedVariables.cpp
    src/compiler/translator/tree_ops/RemoveUnreferencedVariables.h
    src/compiler/translator/tree_ops/RewriteAtomicCounters.cpp
    src/compiler/translator/tree_ops/RewriteAtomicCounters.h
    src/compiler/translator/tree_ops/RewriteAtomicFunctionExpressions.cpp
    src/compiler/translator/tree_ops/RewriteAtomicFunctionExpressions.h
    src/compiler/translator/tree_ops/RewriteCubeMapSamplersAs2DArray.cpp
    src/compiler/translator/tree_ops/RewriteCubeMapSamplersAs2DArray.h
    src/compiler/translator/tree_ops/RewriteDfdy.cpp
    src/compiler/translator/tree_ops/RewriteDfdy.h
    src/compiler/translator/tree_ops/RewriteDoWhile.cpp
    src/compiler/translator/tree_ops/RewriteDoWhile.h
    src/compiler/translator/tree_ops/RewriteExpressionsWithShaderStorageBlock.cpp
    src/compiler/translator/tree_ops/RewriteExpressionsWithShaderStorageBlock.h
    src/compiler/translator/tree_ops/RewriteRepeatedAssignToSwizzled.cpp
    src/compiler/translator/tree_ops/RewriteRepeatedAssignToSwizzled.h
    src/compiler/translator/tree_ops/RewriteRowMajorMatrices.cpp
    src/compiler/translator/tree_ops/RewriteRowMajorMatrices.h
    src/compiler/translator/tree_ops/RewriteStructSamplers.cpp
    src/compiler/translator/tree_ops/RewriteStructSamplers.h
    src/compiler/translator/tree_ops/RewriteStructSamplersOld.cpp
    src/compiler/translator/tree_ops/RewriteTexelFetchOffset.cpp
    src/compiler/translator/tree_ops/RewriteTexelFetchOffset.h
    src/compiler/translator/tree_ops/RewriteUnaryMinusOperatorFloat.cpp
    src/compiler/translator/tree_ops/RewriteUnaryMinusOperatorFloat.h
    src/compiler/translator/tree_ops/RewriteUnaryMinusOperatorInt.cpp
    src/compiler/translator/tree_ops/RewriteUnaryMinusOperatorInt.h
    src/compiler/translator/tree_ops/ScalarizeVecAndMatConstructorArgs.cpp
    src/compiler/translator/tree_ops/ScalarizeVecAndMatConstructorArgs.h
    src/compiler/translator/tree_ops/SeparateDeclarations.cpp
    src/compiler/translator/tree_ops/SeparateDeclarations.h
    src/compiler/translator/tree_ops/SimplifyLoopConditions.cpp
    src/compiler/translator/tree_ops/SimplifyLoopConditions.h
    src/compiler/translator/tree_ops/SplitSequenceOperator.cpp
    src/compiler/translator/tree_ops/SplitSequenceOperator.h
    src/compiler/translator/tree_ops/UnfoldShortCircuitAST.cpp
    src/compiler/translator/tree_ops/UnfoldShortCircuitAST.h
    src/compiler/translator/tree_ops/UseInterfaceBlockFields.cpp
    src/compiler/translator/tree_ops/UseInterfaceBlockFields.h
    src/compiler/translator/tree_ops/VectorizeVectorScalarArithmetic.cpp
    src/compiler/translator/tree_ops/VectorizeVectorScalarArithmetic.h
    src/compiler/translator/tree_util/BuiltIn.h
    src/compiler/translator/tree_util/BuiltIn_ESSL_autogen.h
    src/compiler/translator/tree_util/BuiltIn_complete_autogen.h
    src/compiler/translator/tree_util/FindFunction.cpp
    src/compiler/translator/tree_util/FindFunction.h
    src/compiler/translator/tree_util/FindMain.cpp
    src/compiler/translator/tree_util/FindMain.h
    src/compiler/translator/tree_util/FindSymbolNode.cpp
    src/compiler/translator/tree_util/FindSymbolNode.h
    src/compiler/translator/tree_util/IntermNodePatternMatcher.cpp
    src/compiler/translator/tree_util/IntermNodePatternMatcher.h
    src/compiler/translator/tree_util/IntermNode_util.cpp
    src/compiler/translator/tree_util/IntermNode_util.h
    src/compiler/translator/tree_util/IntermTraverse.cpp
    src/compiler/translator/tree_util/IntermTraverse.h
    src/compiler/translator/tree_util/NodeSearch.h
    src/compiler/translator/tree_util/ReplaceClipDistanceVariable.cpp
    src/compiler/translator/tree_util/ReplaceClipDistanceVariable.h
    src/compiler/translator/tree_util/ReplaceShadowingVariables.cpp
    src/compiler/translator/tree_util/ReplaceShadowingVariables.h
    src/compiler/translator/tree_util/ReplaceVariable.cpp
    src/compiler/translator/tree_util/ReplaceVariable.h
    src/compiler/translator/tree_util/RunAtTheEndOfShader.cpp
    src/compiler/translator/tree_util/RunAtTheEndOfShader.h
    src/compiler/translator/tree_util/Visit.h
    src/compiler/fuzz/translator_fuzzer.cpp
    src/third_party/compiler/ArrayBoundsClamper.cpp)

#BuiltInFunctionEmulatorGLSL.cpp
# ExtensionGLSL.cpp
#OutputGLSLBase.cpp
#OutputGLSL.cpp
#TranslatorGLSL.cpp
# VersionGLSL.cpp

add_definitions(-DANGLE_TRANSLATOR_IMPLEMENTATION  -DANGLE_TRANSLATOR_STATIC  -DANGLE_ENABLE_GLSL -DANGLE_ENABLE_ESSL)

#ANGLE_ENABLE_ESSL
#ANGLE_ENABLE_HLSL

add_library(angle_translator STATIC ${TRANSLATOR_SOURCES} )
#add_dependencies(angle_translator GenExpressionParserSource)
#ADD_DEPENDENCIES(angle_translator GenServerSource)
#target_link_libraries(angle_translator GLcommon android-emu-base)

add_library(shadertranslator SHARED src/libShaderTranslator/libShaderTranslator.cpp)
target_link_libraries(shadertranslator angle_translator dl pthread)

if (NEED_INSTALL)
install(
  TARGETS shadertranslator
  LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif (NEED_INSTALL)